<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets">

<h:head>
	<title>addpersonnel</title>
</h:head>
<body>
	<h:form id="form">

		<p:growl id="growl" sticky="true" showDetail="true" />

		<p:wizard flowListener="#{personnelController.onFlowProcess}">

			<p:tab id="compte" title="Compte">

				<p:panel header="Détails du compte" style="margin-bottom:10px;">



					<p:messages id="messages" />
					<h:panelGrid columns="3" columnClasses="label, value">
						<h:outputLabel for="nomutilisateur" value="Nom d'utilisateur: *" />
						<p:inputText id="nomutilisateur"
							value="#{personnelController.connectedUser.nomutilisateur}"
							required="true" label="Nom d'utilisateur">
							<f:validateLength minimum="3" />
						</p:inputText>
						<p:message for="nomutilisateur" />

						<h:outputLabel for="motdepasse" value="Mot de passe: *" />
						<p:password id="motdepasse"
							value="#{personnelController.connectedUser.motDePasse}"
							required="true" feedback="true" match="confirmation"
							inline="true" label="Mot de passe" />
						<p:message for="motdepasse" />

						<h:outputLabel for="confirmation" value="Confirmation: *" />
						<p:password id="confirmation"
							value="#{personnelController.connectedUser.motDePasse}"
							required="false" label="Confirmation" />
						<p:message for="confirmation" />


						<h:outputLabel for="mail" value="E-mail: " />
						<p:inputText id="mail"
							value="#{personnelController.connectedUser.mail}" label="E-Mail" />
						<p:message for="mail" />
						<h:outputText value="Skip to last: " />
						<h:selectBooleanCheckbox value="#{personnelController.skip}" />
					</h:panelGrid>
				</p:panel>
			</p:tab>

			<p:tab id="identite" title="Identité">
				<p:panel header="Informations personnelles">
					<p:messages id="messages1" />
					<h:panelGrid columns="3" columnClasses="label, value">
						<h:outputLabel for="nom" value="Nom: *" />
						<p:inputText id="nom"
							value="#{personnelController.connectedUser.nom}" required="true"
							label="Nom">
						</p:inputText>
						<p:message for="nom" />

						<h:outputLabel for="prenom" value="Prénom: *" />
						<p:inputText id="prenom"
							value="#{personnelController.connectedUser.prenom}"
							required="true" label="Prénom" />
						<p:message for="prenom" />

						<h:outputLabel for="cin" value="CIN: *" />
						<p:inputText id="cin"
							value="#{personnelController.connectedUser.cin}" required="true"
							label="CIN" />
						<p:message for="cin" />


						<h:outputLabel for="tel" value="Tel: *" />
						<p:inputText id="tel"
							value="#{personnelController.connectedUser.tel}" required="true"
							label="Tel" />
						<p:message for="tel" />

						<h:outputLabel for="age" value="Âge: " />
						<p:inputText id="age"
							value="#{personnelController.connectedUser.age}" label="Age" />
						<p:message for="age" />

						<h:outputLabel for="anneesanciennete"
							value="Années d'ancienneté: " />
						<p:inputText id="anneesanciennete"
							value="#{personnelController.connectedUser.anneesDeTravail}"
							label="anneesanciennete" />
						<p:message for="anneesanciennete" />


						<h:outputText value="Skip to last: " />
						<h:selectBooleanCheckbox value="#{personnelController.skip}" />
					</h:panelGrid>
				</p:panel>
			</p:tab>

			<p:tab id="poste" title="Poste">
				<p:panel header="Détails du poste">
					<p:messages id="messages2" />
					<h:panelGrid columns="3" columnClasses="label, value">


						<h:outputLabel for="codeposte" value="Code du poste: *" />
						<p:inputText id="codeposte"
							value="#{personnelController.poste.codePoste}" required="true"
							label="code du  poste" />
						<p:message for="codeposte" />

						<h:outputLabel for="titre" value="Titre: *" />
						<p:inputText id="titre" value="#{personnelController.poste.titre}"
							required="true" label="Titre" />
						<p:message for="titre" />

					</h:panelGrid>
				</p:panel>
			</p:tab>

			<p:tab id="confirm" title="Confirmation">
				<p:panel header="Confirmation">

					<h:panelGrid id="confirmationn" columns="2">
						<h:outputText value="Nom d'utilisateur: " />
						<h:outputText styleClass="outputLabel"
							value="#{personnelController.connectedUser.nomutilisateur}" />

						<h:outputText value="E-mail: " />
						<h:outputText styleClass="outputLabel"
							value="#{personnelController.connectedUser.mail}" />

						<h:outputText value="Nom: " />
						<h:outputText styleClass="outputLabel"
							value="#{personnelController.connectedUser.nom}" />

						<h:outputText value="Prénom: " />
						<h:outputText styleClass="outputLabel"
							value="#{personnelController.connectedUser.prenom}" />

						<h:outputText value="CIN: " />
						<h:outputText styleClass="outputLabel"
							value="#{personnelController.connectedUser.cin}" />

						<h:outputText value="Tel: " />
						<h:outputText styleClass="outputLabel"
							value="#{personnelController.connectedUser.tel}" />



						<h:outputText value="Âge: " />
						<h:outputText styleClass="outputLabel"
							value="#{personnelController.connectedUser.age}" />

						<h:outputText value="Années d'ancienneté: " />
						<h:outputText styleClass="outputLabel"
							value="#{personnelController.connectedUser.anneesDeTravail}" />


						<h:outputText value="Code du poste: " />
						<h:outputText styleClass="outputLabel"
							value="#{personnelController.poste.codePoste}" />


						<h:outputText value="Titre: " />
						<h:outputText styleClass="outputLabel"
							value="#{personnelController.poste.titre}" />

						<h:outputText />
						<h:outputText />
					</h:panelGrid>


					<p:commandButton id="enregistrer"
						action="#{personnelController.add()}" value="Enregistrer"
						ajax="false" icon="ui-icon-check" style="margin:0" />




				</p:panel>
			</p:tab>


		</p:wizard>
	</h:form>
</body>
</html>